<template>
  <div>
    <el-menu
     :default-active="onRoutes"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      router
    >
      <el-menu-item index="/"> 首页</el-menu-item>
      <el-menu-item index="/msg" >消息中心</el-menu-item>
      <el-menu-item index="/order">订单管理</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "headerNav",
  data() {
    return {
       activeIndex: "/",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
    }
  },
  computed: {
    onRoutes() {
      return this.$route.path;
    }
  },
};
</script>

<style scoped>
</style>